//
//  NXButton.m
//  SDNestedTablesExample
//
//  Created by banbu3 on 14-3-26.
//
//

#import "NXButton.h"
#import "UIButton+WebCache.h"
#import "UIButton+WebCacheBack.h"
@implementation NXButton

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}
-(void)setUface:(NSString *)uface
{
    _uface = [uface copy];
    [self setImageWithURL:[NSURL URLWithString:_uface] placeholderImage:nil andType:0];
    [self setBackgroundImageWithURL:[NSURL URLWithString:_uface] placeholderImage:[UIImage imageNamed:@"default.png"] andType:0];

//    [self setImageWithURL:[NSURL URLWithString:_uface] placeholderImage:[UIImage imageNamed:@"icon_default.png"] andType:0];
}
-(void)setIndex:(NSInteger)index
{
    _index = index;
    self.tag = index+1;
}
-(void)setIndexPath:(NSIndexPath *)_indexPath
{
    self.row = _indexPath.row;
    self.section = _indexPath.section;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
